<html>
<head><meta charset="utf-8"><title>progress updates · t-compiler/wg-polymorphization · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/index.html">t-compiler/wg-polymorphization</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html">progress updates</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182470358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/182470358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#182470358">(Dec 03 2019 at 16:58)</a>:</h4>
<p>(this thread continues from some private messages where I was keeping people up-to-date, it might also be useful for <a class="stream" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler">#t-compiler</a> meeting wg check-ins)</p>
<hr>
<p><strong>Another update:</strong> continued from where I was before - got the test I added (still behind a flag) passing and showing that less mono-items are being produced.</p>
<p>I've since been trying to remove the flag and run the analysis for everything and get that working. I've been making progress and I've got everything up to <code>libproc_macro</code> compiling again, it is failing with <a href="http://sprunge.us/6VOPjs" target="_blank" title="http://sprunge.us/6VOPjs">this error</a> that I've hit a bit of a wall fixing.</p>
<p><a href="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization" target="_blank" title="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization">This branch</a> still contains everything so if you have any ideas on what might be up, I'd appreciate it. I'm going to shift gears from focusing on the implementation to focusing on the interim report I need to write on this, which is due in a couple weeks (though, if I do unblock myself, I'd like to get a PR up with this working soon).</p>
<p>(the last commit is the one that enables the analysis w/out the flag - by changing the default value to <code>true</code>, I'll eventually remove it entirely)</p>
<p>There are also plenty of places where I just made a decision on how to do something so I could proceed, there's no doubt lots of it that needs work.</p>



<a name="184547502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/184547502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#184547502">(Dec 31 2019 at 14:50)</a>:</h4>
<p>Hey, how goes it <span class="user-mention" data-user-id="116107">@davidtwco</span> ? Sorry I've not been following too closely -- curious to hear how it goes!</p>



<a name="184547714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/184547714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#184547714">(Dec 31 2019 at 14:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I’ve not made a lot of progress since the last update, been working on the patch here and there during the holidays. Before the holidays, I was mostly focused on reports I had to write for the university. </p>
<p>I’ve made a change that I think fixed the ICE that I was getting, but I’m not completely confident. The fix made sense based on what <span class="user-mention silent" data-user-id="119009">eddyb</span> had suggested was the issue, but I’ve now got an ICE in an earlier crate (<code>libcore</code> instead of <code>libproc_macro</code>) which I wasn’t expecting. Not made a whole lot of progress solving that. Lost some time last week when backtraces went missing (<a href="https://github.com/rust-lang/rust/issues/67615" target="_blank" title="https://github.com/rust-lang/rust/issues/67615">#67615</a>).</p>



<a name="184547814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/184547814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#184547814">(Dec 31 2019 at 14:57)</a>:</h4>
<p>OK -- I'm wondering how much this can be landed in slices</p>



<a name="184547876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/184547876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#184547876">(Dec 31 2019 at 14:58)</a>:</h4>
<p>Everything except the last commit I have passes all tests - I’d want to tidy it a little bit, but everything is behind flags and only my tests use it. It isn’t enough to compile the compiler (which is what the last commit tries to enable).</p>



<a name="184547994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/184547994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#184547994">(Dec 31 2019 at 15:00)</a>:</h4>
<p>One place that I’ve struggled is coming up with sufficient test cases such that I’m not debugging huge crates that ICE instead of smaller test cases. I think if I were able to do that better, I’d be able to better understand and fix issues quicker and get something that can bootstrap quicker.</p>



<a name="187386781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187386781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187386781">(Feb 04 2020 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> do you think there would be room for others to get involved and help out here? I'm also wondering if we have any estimates beyond "intuition" of the payoff here yet?</p>



<a name="187386797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187386797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187386797">(Feb 04 2020 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> and I are trying to think carefully about where to spend our energies</p>



<a name="187386833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187386833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187386833">(Feb 04 2020 at 18:47)</a>:</h4>
<p>This work still <em>feels</em> very promising to me in terms of making big wins for compilation time, at least some of the time</p>



<a name="187398492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187398492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187398492">(Feb 04 2020 at 20:48)</a>:</h4>
<p>I’ve not got much of a sense of how impactful it would be. I’m still trying to hammer away at the ICE that I hit a few weeks ago (I rebased at one point which introduced new ICEs from some new code that was added which took a bit to work through to get back to where I was). I’ve just struggled to find the time between work and other university courses. I intend to start sinking more time into it soon.</p>



<a name="187398594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187398594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187398594">(Feb 04 2020 at 20:49)</a>:</h4>
<p>Given that it’s just trying to get the core to build with the changes at the moment, I’m not sure there’s much room to parallelise.</p>



<a name="187398700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187398700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187398700">(Feb 04 2020 at 20:50)</a>:</h4>
<p>I have a feeling there aren’t many ICEs left to deal with until it’s working, I just need to figure those out.</p>



<a name="187398927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187398927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187398927">(Feb 04 2020 at 20:52)</a>:</h4>
<p>To elaborate on what error I’m seeing before, it’s the error where <span class="user-mention" data-user-id="119009">@eddyb</span> suggested that trait substs for vtable entries were being used where impl substs were expected. I’ve been digging into it for a while now but struggling to make headway. I’ve got notes written down that I can fetch with what my theories and understanding was last I was working on this.</p>



<a name="187399002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187399002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187399002">(Feb 04 2020 at 20:53)</a>:</h4>
<p>Though, I don’t know how much rework there will need to be if the compiler team don’t like some of the decisions I’ve made in integrating the unused type parameter analysis</p>



<a name="187399047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187399047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187399047">(Feb 04 2020 at 20:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ^</p>



<a name="187460425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187460425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187460425">(Feb 05 2020 at 14:59)</a>:</h4>
<blockquote>
<p>Though, I don’t know how much rework there will need to be if the compiler team don’t like some of the decisions I’ve made in integrating the unused type parameter analysis</p>
</blockquote>
<p>Maybe we could schedule a design meeting to discuss this?</p>



<a name="187460988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187460988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187460988">(Feb 05 2020 at 15:05)</a>:</h4>
<p>Potentially, I don't think it's large enough to warrant that, discussion on the eventual PR would probably be sufficient.</p>



<a name="187461367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187461367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187461367">(Feb 05 2020 at 15:09)</a>:</h4>
<p>Well if you're worried about the design decisions, I figure it makes some amount of sense to advertise them ahead of time. Do the commit messages point out the cases you think might be contentious, or is there some other way that they are flagged up front?</p>



<a name="187461427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187461427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187461427">(Feb 05 2020 at 15:09)</a>:</h4>
<p>even if all we do is point it out during the triage meeting, that might be enough to at least give the people with an opinion a chance to voice that opinion.</p>



<a name="187461928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187461928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187461928">(Feb 05 2020 at 15:14)</a>:</h4>
<p>That's a good point. People could definitely look at the branch and leave some comments here or on GitHub if we highlighted it at a triage meeting.</p>



<a name="187462113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187462113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187462113">(Feb 05 2020 at 15:16)</a>:</h4>
<p>Primarily it is the way that I've chosen to integrate the analysis into <code>Instance::resolve</code> (and then that trickles down into fewer <code>MonoItem</code>s and less codegen) rather than modify the <code>Instance</code> in <code>MonoItem::Fn</code> during monomorphisation with the analysis results and then update where we generate call instructions to match.</p>



<a name="187462401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187462401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187462401">(Feb 05 2020 at 15:19)</a>:</h4>
<p>Modifying all <code>Instance</code>s has more side-effects, as that type is used in more places (which has almost certainly resulted in some of the ICEs I've been dealing with),  but results in a much less invasive change.</p>



<a name="187462598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187462598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187462598">(Feb 05 2020 at 15:21)</a>:</h4>
<p>One of the descriptions of the <code>Instance</code> type that I read somewhere in the compiler made me think it was a good fit conceptually too.</p>



<a name="187467274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187467274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187467274">(Feb 05 2020 at 16:09)</a>:</h4>
<p>Actually, another thought: Even if this doesn't need a design meeting, per se, I think it <em>does</em> qualify as a major change</p>



<a name="187467301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187467301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187467301">(Feb 05 2020 at 16:09)</a>:</h4>
<p>which means you could/should write this up following the major change protocol</p>



<a name="187467372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187467372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187467372">(Feb 05 2020 at 16:10)</a>:</h4>
<p>in the same way that mw did on <a href="https://github.com/rust-lang/compiler-team/issues/245" target="_blank" title="https://github.com/rust-lang/compiler-team/issues/245">compiler-team#245</a></p>



<a name="187467396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187467396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187467396">(Feb 05 2020 at 16:10)</a>:</h4>
<p>and then any debate could be captured on the issue thread there</p>



<a name="187467462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187467462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187467462">(Feb 05 2020 at 16:11)</a>:</h4>
<p>I mainly want to ensure we have a good place to capture your exploration of the design space, and the justifications you used to guide your decisions</p>



<a name="187845424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187845424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187845424">(Feb 10 2020 at 18:47)</a>:</h4>
<p>I wasn't actually aware of this WG and it's not on the compiler-team website. Could someone give a brief summary of what <code>polymorphization</code> is and what the WG aims to solve?</p>



<a name="187854526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187854526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187854526">(Feb 10 2020 at 20:25)</a>:</h4>
<p><a href="https://rust-lang.github.io/compiler-team/working-groups/polymorphization/" target="_blank" title="https://rust-lang.github.io/compiler-team/working-groups/polymorphization/">https://rust-lang.github.io/compiler-team/working-groups/polymorphization/</a></p>



<a name="187932452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932452">(Feb 11 2020 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> I assume the details of the crate names in the test output is a wart that we should get rid of somehow, right?</p>



<a name="187932589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932589">(Feb 11 2020 at 17:21)</a>:</h4>
<p>I'm speaking of differences in test output like this: <a href="https://gist.github.com/pnkfelix/8dc3cf3da80f57842f6ce7762a23ade3" target="_blank" title="https://gist.github.com/pnkfelix/8dc3cf3da80f57842f6ce7762a23ade3">diff gist</a></p>



<a name="187932715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932715">(Feb 11 2020 at 17:22)</a>:</h4>
<p>where the only difference is the <code>...</code> stuff in <code>core[...]::foo[0]::bar[0]</code> or <code>alloc[...]::foo[0]::bar[0]</code></p>



<a name="187932777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932777">(Feb 11 2020 at 17:22)</a>:</h4>
<p>(Probably easiest/best to just normalize the test.stderr to get rid of it via a regexp substitution)</p>



<a name="187932782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932782">(Feb 11 2020 at 17:22)</a>:</h4>
<p>Are you looking at this branch - <a href="https://github.com/davidtwco/rust/tree/issue-46477-polymorphization" target="_blank" title="https://github.com/davidtwco/rust/tree/issue-46477-polymorphization">https://github.com/davidtwco/rust/tree/issue-46477-polymorphization</a> ?</p>



<a name="187932794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932794">(Feb 11 2020 at 17:23)</a>:</h4>
<p>or this one - <a href="https://github.com/davidtwco/rust/tree/polymorphize-analysis" target="_blank" title="https://github.com/davidtwco/rust/tree/polymorphize-analysis">https://github.com/davidtwco/rust/tree/polymorphize-analysis</a> ?</p>



<a name="187932799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932799">(Feb 11 2020 at 17:23)</a>:</h4>
<p>the latter</p>



<a name="187932812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932812">(Feb 11 2020 at 17:23)</a>:</h4>
<p>though mine might be out of date</p>



<a name="187932830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932830">(Feb 11 2020 at 17:23)</a>:</h4>
<p>Should be the former, I think.</p>



<a name="187932852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932852">(Feb 11 2020 at 17:23)</a>:</h4>
<p>The latter branch is when Niko and I first worked on this, not my most recent work.</p>



<a name="187932860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932860">(Feb 11 2020 at 17:23)</a>:</h4>
<p>These changes are the primary work - <a href="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization" target="_blank" title="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization">https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization</a></p>



<a name="187932924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932924">(Feb 11 2020 at 17:24)</a>:</h4>
<p>oh oh you're right, I missed the <em>year</em> when I looked at the date of the last commit on polymorphize-analysis</p>



<a name="187932941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932941">(Feb 11 2020 at 17:24)</a>:</h4>
<p>and I said "ah, January is more recent that December; done!"</p>



<a name="187932973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187932973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187932973">(Feb 11 2020 at 17:24)</a>:</h4>
<p>This one only considers unused type parameters.</p>



<a name="187933002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933002">(Feb 11 2020 at 17:25)</a>:</h4>
<p>The testing is a little bit cleaner, I think.</p>



<a name="187933028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933028">(Feb 11 2020 at 17:25)</a>:</h4>
<p>The primary issue with it is that it cannot bootstrap (which the last commit enables by swapping a feature flag).</p>



<a name="187933059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933059">(Feb 11 2020 at 17:25)</a>:</h4>
<p>AFAIK (a rebase might have changed this), it passed all tests, including my own tests of the polymorphization's integration, without the last commit.</p>



<a name="187933183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933183">(Feb 11 2020 at 17:27)</a>:</h4>
<p>(seems like the most recent commit does quite a bit more, at least superficially, than just swapping a feature flag...)</p>



<a name="187933233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933233">(Feb 11 2020 at 17:27)</a>:</h4>
<p>but its WIP (and explicitly marked as such) so I'm not complaining</p>



<a name="187933355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933355">(Feb 11 2020 at 17:28)</a>:</h4>
<p>It does, I've been putting any WIP changes that I've been experimenting with (to fix the ICEs) in that commit so it's pushed somewhere when I'm between machines.</p>



<a name="187933376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933376">(Feb 11 2020 at 17:28)</a>:</h4>
<p>and then breaking bunches of those out into separate commits at later stages</p>



<a name="187933441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/187933441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#187933441">(Feb 11 2020 at 17:29)</a>:</h4>
<p>I've not rebased since the start of the year so I don't know what impact that will have, I lost a week or so debugging a new ICE that was introduced at that rebase.</p>



<a name="188058603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188058603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188058603">(Feb 12 2020 at 22:14)</a>:</h4>
<p>How is it going? Is there something a Rubber duck can do to help?</p>



<a name="188222964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188222964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188222964">(Feb 14 2020 at 16:40)</a>:</h4>
<p>I think maybe pulling down the branch and trying to build it, <span class="user-mention" data-user-id="120179">@Eh2406</span>, and just see if you can figure out whatever is stopping it, would be the best thing</p>



<a name="188222989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188222989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188222989">(Feb 14 2020 at 16:41)</a>:</h4>
<p>I have the feeling <span class="user-mention" data-user-id="116107">@davidtwco</span> is pretty busy just now but if, when he comes back to it, there were a few fewer bugs to fix, I'm sure he wouldn't complain :)</p>



<a name="188222996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188222996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188222996">(Feb 14 2020 at 16:41)</a>:</h4>
<p>actually maybe just rebasing the branch would be helpful?</p>



<a name="188223193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188223193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188223193">(Feb 14 2020 at 16:43)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> and I spoke briefly on Discord in #wg-compiler-performance there about it. It's blocked on me clearing some coursework off my plate before I can get back to it. I'm not sure how it works with this being part of my master's thesis if anyone else works on it, but if anyone wants to pull it and see if they can't work out what's going on, I'd be fine with that - it's still work that the project wants done, irrespective of it being part of my thesis.</p>



<a name="188223321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188223321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188223321">(Feb 14 2020 at 16:44)</a>:</h4>
<p>I've always wondered a bit about that when it comes to theses; but I suspect it's not a problem if other people are helping out a little. Though you may want to talk to your advisor about it, yeah.</p>



<a name="188223507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188223507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188223507">(Feb 14 2020 at 16:46)</a>:</h4>
<p>Normally it's probably not as required, but because of my degree program having an industrial placement last year, I need to take eight courses alongside the master's project (and I work three days a week) so my time is quite stretched.</p>



<a name="188302454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188302454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188302454">(Feb 15 2020 at 23:04)</a>:</h4>
<p>I did some work today, I got rust repo set up and building and tests passing. So I am set up to start trying to understand, next time I have time.</p>



<a name="188339000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188339000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188339000">(Feb 16 2020 at 20:54)</a>:</h4>
<p>An automatic understanding free rebase got hung up on the interactions with <a href="https://github.com/rust-lang/rust/pull/69100" target="_blank" title="https://github.com/rust-lang/rust/pull/69100">https://github.com/rust-lang/rust/pull/69100</a><br>
The PR rebased pretty cleanly on to the conflicts parent. <a href="https://github.com/Eh2406/rust/tree/issue-46477-polymorphization" target="_blank" title="https://github.com/Eh2406/rust/tree/issue-46477-polymorphization">https://github.com/Eh2406/rust/tree/issue-46477-polymorphization</a></p>



<a name="188339097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188339097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188339097">(Feb 16 2020 at 20:57)</a>:</h4>
<p>I think the next step is a slower, one commit at a time cherry pick rebase. (Unless you have a alternative suggestion.)<br>
<span class="user-mention" data-user-id="116107">@davidtwco</span>  does each commit <code>check</code> on its own?</p>



<a name="188339386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188339386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188339386">(Feb 16 2020 at 21:05)</a>:</h4>
<p>It should do, I think I tried to ensure that was the case.</p>



<a name="188499704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188499704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188499704">(Feb 18 2020 at 22:52)</a>:</h4>
<p>I've managed to get some time together today and I've rebased the PR.</p>



<a name="188499716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188499716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188499716">(Feb 18 2020 at 22:52)</a>:</h4>
<p>Everything I have locally has been pushed.</p>



<a name="188499737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188499737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188499737">(Feb 18 2020 at 22:53)</a>:</h4>
<p>It fails earlier than it did before, but after speaking to <span class="user-mention silent" data-user-id="119009">eddyb</span>, I've got some ideas for a path forward, which I'll hopefully have time for during the remainder of the week.</p>



<a name="188832153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188832153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188832153">(Feb 22 2020 at 20:32)</a>:</h4>
<p>I was just going to ask for help getting my version of the reabase to work... glad to here I dont need to!</p>



<a name="188838450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/188838450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#188838450">(Feb 22 2020 at 23:52)</a>:</h4>
<p>Let me know how I (or my cpu) can (try) to help!</p>



<a name="189549311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189549311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189549311">(Mar 02 2020 at 23:38)</a>:</h4>
<p><strong>An update:</strong> thanks to help from <span class="user-mention silent" data-user-id="119009">eddyb</span>, I've gotten <a href="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization" target="_blank" title="https://github.com/rust-lang/rust/compare/master...davidtwco:issue-46477-polymorphization">the branch</a> to the point where it can now bootstrap itself and is failing one UI test (not checked the other suites yet). There's still some tidying up to do and making sure it's working so I'll do that over the next few days and get a PR up.</p>



<a name="189629556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189629556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189629556">(Mar 03 2020 at 20:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> that's awesome &lt;3</p>



<a name="189802933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189802933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189802933">(Mar 05 2020 at 15:31)</a>:</h4>
<p>So is it working well enough to get some sense of perf?</p>



<a name="189844639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189844639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189844639">(Mar 05 2020 at 22:33)</a>:</h4>
<p>Looked into the test failure a bunch, no luck on fixing. Opened a PR here: <a href="https://github.com/rust-lang/rust/pull/69749" target="_blank" title="https://github.com/rust-lang/rust/pull/69749">https://github.com/rust-lang/rust/pull/69749</a> - please leave all the comments!</p>



<a name="189844692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189844692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189844692">(Mar 05 2020 at 22:34)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> probably, I've not checked though</p>



<a name="189986132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189986132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189986132">(Mar 07 2020 at 21:03)</a>:</h4>
<p>Tried to build locally (so I can do a perf run) but I am getting an ICE. I think it looks like the ICE that CI hit.</p>



<a name="189986819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189986819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189986819">(Mar 07 2020 at 21:24)</a>:</h4>
<p>Missed that ICE locally because I only did a stage one build, looking into it (and review comments) now.</p>



<a name="189994009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189994009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189994009">(Mar 08 2020 at 01:22)</a>:</h4>
<p>Made progress on review comments, not so much on ICEs, will continue tomorrow.</p>



<a name="189994011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/189994011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#189994011">(Mar 08 2020 at 01:22)</a>:</h4>
<p>(...or today, but later, I suppose)</p>



<a name="190605413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190605413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190605413">(Mar 14 2020 at 17:18)</a>:</h4>
<p><strong>Another update:</strong> I've pushed to the PR, hopefully resolving all compilation and test failures, see <a href="https://github.com/rust-lang/rust/issues/69749" target="_blank" title="https://github.com/rust-lang/rust/issues/69749">#69749</a>.</p>



<a name="190628274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190628274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190628274">(Mar 15 2020 at 03:56)</a>:</h4>
<p>I tried to do a perf run. It did build successfully! I still haven't managed to set up perf correctly yet. but I did see some ICEs in the logs. I think syn is not working yet, but did not have time to investigate.</p>



<a name="190642155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190642155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190642155">(Mar 15 2020 at 11:08)</a>:</h4>
<p>Turns out there were test failures in one of the smaller suites, will look into that during the week. Hopefully it’s not too buggy and we’ll be able to get a sense of whether there’s a perf difference.</p>



<a name="190642268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190642268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190642268">(Mar 15 2020 at 11:12)</a>:</h4>
<p>I’m not going to rebase yet either, the PR that this depends on, <a href="https://github.com/rust-lang/rust/issues/69935" target="_blank" title="https://github.com/rust-lang/rust/issues/69935">#69935</a>, is still in the queue and without conflicts so I’ll wait till that lands.</p>



<a name="190645014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190645014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190645014">(Mar 15 2020 at 12:28)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <strong>Small update:</strong> I'm going to switch gears for a few days and work on my report for this - I'll be able to get most of it done, just leaving out the evaluation - I'll feel much more comfortable sinking time into the implementation afterwards when I know that work is out of the way. </p>
<p>My main concerns at the moment is that the implementation might not be at a place where I can compile some popular crates and get a idea of the perf difference, there are two reasons:</p>
<ul>
<li>Bugs that we've not seen/solved (e.g. ICEs referenced by <span class="user-mention silent" data-user-id="120179">Eh2406</span>, the failing <code>run-make-fulldeps</code> test).</li>
<li>Workaround for the "still further specializable" issue (see <a href="https://github.com/rust-lang/rust/pull/69749/commits/01f58673a680abfcb0d5a8ad28ca870433a86ff5" target="_blank" title="https://github.com/rust-lang/rust/pull/69749/commits/01f58673a680abfcb0d5a8ad28ca870433a86ff5">01f5867</a>) might have a perf impact that cancels out any positive impact.<br>
    - There's <span class="user-mention silent" data-user-id="119009">eddyb</span>'s patch that could allow for a faster fix here, <a href="https://github.com/rust-lang/rust/issues/69968" target="_blank" title="https://github.com/rust-lang/rust/issues/69968">#69968</a>, but we'll need to make a decision on whether the perf impact of that PR is acceptable.</li>
</ul>



<a name="190645108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190645108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190645108">(Mar 15 2020 at 12:31)</a>:</h4>
<p>(if anyone's willing to help fix/investigate the test failure that's there, or look into the perf then I'm totally open to that - I've done enough of the changes that I'm sure someone else fixing a bug or two won't be a problem for the purposes of this being my master's project)</p>



<a name="190647956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190647956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190647956">(Mar 15 2020 at 13:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120179">Eh2406</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190628274" title="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190628274">said</a>:</p>
<blockquote>
<p>I tried to do a perf run. It did build successfully! I still haven't managed to set up perf correctly yet. but I did see some ICEs in the logs. I think syn is not working yet, but did not have time to investigate.</p>
</blockquote>
<p>shouldn't we just be able to use @bors try and @rust-timer? or do you mean that?</p>



<a name="190648101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190648101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190648101">(Mar 15 2020 at 13:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116107">davidtwco</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190645014" title="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190645014">said</a>:</p>
<blockquote>
<p>- There's <span class="user-mention silent" data-user-id="119009">eddyb</span>'s patch that could allow for a faster fix here, <a href="https://github.com/rust-lang/rust/issues/69968" target="_blank" title="https://github.com/rust-lang/rust/issues/69968">#69968</a>, but we'll need to make a decision on whether the perf impact of that PR is acceptable.</p>
</blockquote>
<p>that's not exactly the decision to make :P</p>
<p>I have guessed that the problem is adding a generic when there weren't any (i.e. there are enough captureless closures that now have an argument that's always <code>()</code>)</p>
<p>and my proposed potential solution is to tuple all of the synthetics together instead of just the upvars, but I haven't tried it yet</p>



<a name="190650264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190650264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190650264">(Mar 15 2020 at 14:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190648101" title="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/190648101">said</a>:</p>
<blockquote>
<p>and my proposed potential solution is to tuple all of the synthetics together instead of just the upvars, but I haven't tried it yet</p>
</blockquote>
<p>started working on that, just adjusted the existing commit to make it easier to tuple more things without breaking <code>rustc::ty::print::pretty</code> and <code>rustc_typeck::check::closure</code></p>



<a name="190650873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190650873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190650873">(Mar 15 2020 at 15:02)</a>:</h4>
<blockquote>
<p>shouldn't we just be able to use @bors try and @rust-timer? or do you mean that?</p>
</blockquote>
<p>I was trying to be helpful by running locally. rust-timer will work when we have time for it.</p>



<a name="190652835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190652835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190652835">(Mar 15 2020 at 15:48)</a>:</h4>
<blockquote>
<p>that's not exactly the decision to make :P</p>
</blockquote>
<p>Ah, I misunderstood.</p>



<a name="190655630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190655630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190655630">(Mar 15 2020 at 16:52)</a>:</h4>
<blockquote>
<p>rust-timer will work when we have time for it.<br>
are we running out of slots for that? I was about to start another run for my PR that tuples up upvars</p>
</blockquote>



<a name="190656127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190656127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190656127">(Mar 15 2020 at 17:02)</a>:</h4>
<p>no queue is empty</p>



<a name="190656390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190656390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190656390">(Mar 15 2020 at 17:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> <a href="https://github.com/rust-lang/rust/pull/69968#issuecomment-599237539" target="_blank" title="https://github.com/rust-lang/rust/pull/69968#issuecomment-599237539">https://github.com/rust-lang/rust/pull/69968#issuecomment-599237539</a></p>



<a name="190656397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190656397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190656397">(Mar 15 2020 at 17:07)</a>:</h4>
<p>see the HACK commit</p>



<a name="190656450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190656450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190656450">(Mar 15 2020 at 17:08)</a>:</h4>
<p>Awesome</p>



<a name="190672968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190672968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190672968">(Mar 15 2020 at 23:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> screwed up whoops</p>



<a name="190673172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190673172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190673172">(Mar 15 2020 at 23:40)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/69968#issuecomment-599281756" target="_blank" title="https://github.com/rust-lang/rust/pull/69968#issuecomment-599281756">https://github.com/rust-lang/rust/pull/69968#issuecomment-599281756</a></p>



<a name="190673308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190673308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190673308">(Mar 15 2020 at 23:45)</a>:</h4>
<p>I'll look into the actual speedups tomorrow</p>



<a name="190673344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190673344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190673344">(Mar 15 2020 at 23:45)</a>:</h4>
<p>they basically involve deferring calling <code>.expect_ty()</code> or w/e until the very last moment :P</p>



<a name="190673406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190673406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190673406">(Mar 15 2020 at 23:46)</a>:</h4>
<p>since that's the only thing that looks significantly different to me (if it's actually the tuple itself that'd be annoying)</p>



<a name="190927889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190927889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190927889">(Mar 18 2020 at 00:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> decided to do this as a side thing but I don't think it will impact anything <a href="https://github.com/rust-lang/rust/pull/70089" target="_blank" title="https://github.com/rust-lang/rust/pull/70089">https://github.com/rust-lang/rust/pull/70089</a></p>



<a name="190927895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190927895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190927895">(Mar 18 2020 at 00:25)</a>:</h4>
<p>now to get back to the original PR and try to uhh make it fast</p>



<a name="190929836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190929836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190929836">(Mar 18 2020 at 01:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> <a href="https://github.com/rust-lang/rust/pull/69968#issuecomment-600370100" target="_blank" title="https://github.com/rust-lang/rust/pull/69968#issuecomment-600370100">https://github.com/rust-lang/rust/pull/69968#issuecomment-600370100</a></p>



<a name="190962133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190962133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190962133">(Mar 18 2020 at 10:33)</a>:</h4>
<p>phew those are better</p>



<a name="190962291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190962291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190962291">(Mar 18 2020 at 10:34)</a>:</h4>
<p>there's 18 less <code>generic_of</code> calls for the biggest win (<code>-2.2%</code>)</p>



<a name="190962309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190962309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190962309">(Mar 18 2020 at 10:34)</a>:</h4>
<p>so it might be related</p>



<a name="190972730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/190972730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#190972730">(Mar 18 2020 at 12:30)</a>:</h4>
<p>That's awesome.</p>



<a name="191148256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191148256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191148256">(Mar 19 2020 at 17:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> <a href="https://github.com/rust-lang/rust/pull/69968#issuecomment-601230356" target="_blank" title="https://github.com/rust-lang/rust/pull/69968#issuecomment-601230356">https://github.com/rust-lang/rust/pull/69968#issuecomment-601230356</a></p>



<a name="191150003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191150003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191150003">(Mar 19 2020 at 17:45)</a>:</h4>
<p>I saw, I'll need to wait for <a href="https://github.com/rust-lang/rust/issues/69935" target="_blank" title="https://github.com/rust-lang/rust/issues/69935">#69935</a> too before rebasing though.</p>



<a name="191150023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191150023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191150023">(Mar 19 2020 at 17:45)</a>:</h4>
<p>I don't need to, but to save effort will.</p>



<a name="191662670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191662670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191662670">(Mar 24 2020 at 19:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> what is the status here btw?</p>



<a name="191662741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191662741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191662741">(Mar 24 2020 at 19:45)</a>:</h4>
<p>I just pushed earlier today, resolves any comments that were left and should have passing tests (CI still running).</p>



<a name="191662790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191662790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191662790">(Mar 24 2020 at 19:46)</a>:</h4>
<p>I've said that before though, but <span aria-label="fingers crossed" class="emoji emoji-1f91e" role="img" title="fingers crossed">:fingers_crossed:</span></p>



<a name="191663025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191663025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191663025">(Mar 24 2020 at 19:48)</a>:</h4>
<p>I've written like 65% of my paper. I'll shift back to that tomorrow with the aim of only having the evaluation left - where I'll try collect some numbers on the perf of this.</p>



<a name="191663100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191663100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191663100">(Mar 24 2020 at 19:49)</a>:</h4>
<p>(the only sections I've got left to write are an abstract, introduction (what is rust, what is llvm, why do we want this, etc), talking about how it works, challenges faced, the evaluation, and a conclusion - easy parts hopefully)</p>



<a name="191671858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191671858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191671858">(Mar 24 2020 at 21:02)</a>:</h4>
<p>CI is passing!</p>



<a name="191674749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191674749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191674749">(Mar 24 2020 at 21:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116107">davidtwco</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/191663100" title="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/191663100">said</a>:</p>
<blockquote>
<p>(the only sections I've got left to write are an abstract, introduction (what is rust, what is llvm, why do we want this, etc), talking about how it works, challenges faced, the evaluation, and a conclusion - easy parts hopefully)</p>
</blockquote>
<p>I am trying to do a local perf run.</p>



<a name="191692845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191692845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191692845">(Mar 25 2020 at 01:21)</a>:</h4>
<p>I did it a number of times, to check in case I set it up wrong. But I am seeing large regressions across the board. Even the helloworld benchmark is dramatically slower. I don't know the best way to share the results.</p>



<a name="191693152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191693152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191693152">(Mar 25 2020 at 01:27)</a>:</h4>
<p><a href="/user_uploads/4715/uDqcJcsL8QttKp5jB82qtSiR/commit-m-PR-x86_64-unknown-linux-gnu.json.sz" target="_blank" title="commit-m-PR-x86_64-unknown-linux-gnu.json.sz">commit-m-PR-x86_64-unknown-linux-gnu.json.sz</a> <a href="/user_uploads/4715/t1LGjc046z3e7nKDg34brrx5/commit-PR-x86_64-unknown-linux-gnu.json.sz" target="_blank" title="commit-PR-x86_64-unknown-linux-gnu.json.sz">commit-PR-x86_64-unknown-linux-gnu.json.sz</a></p>



<a name="191693170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191693170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191693170">(Mar 25 2020 at 01:27)</a>:</h4>
<p>m-PR is the master you rebased onto. PR is the PR.</p>



<a name="191727561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191727561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191727561">(Mar 25 2020 at 10:50)</a>:</h4>
<p>It’s possible that this is just really bad, but there’s also a chance that one we look into why it’s bad, that I’ve just made a mistake somewhere.</p>



<a name="191732676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191732676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191732676">(Mar 25 2020 at 11:42)</a>:</h4>
<p>I've <a href="https://github.com/rust-lang/rust/pull/69749#issuecomment-603775712" title="https://github.com/rust-lang/rust/pull/69749#issuecomment-603775712">queued a timer run</a> so we'll see if that shows the same regression - I can think of one or two places where things could probably be made a little faster, but not many.</p>



<a name="191733045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191733045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191733045">(Mar 25 2020 at 11:47)</a>:</h4>
<p>Looks like that try build is failing though <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="191806425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191806425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191806425">(Mar 25 2020 at 20:25)</a>:</h4>
<p>I mean certainly the analysis could be costing compilation time, and we might not be recouping it with reduced LLVM</p>



<a name="191806430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191806430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191806430">(Mar 25 2020 at 20:25)</a>:</h4>
<p>It definitely bears investigation</p>



<a name="191806532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/191806532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#191806532">(Mar 25 2020 at 20:26)</a>:</h4>
<p>It's certainly possible, I intend to look into it tomorrow (since the try build changed, there's more bugs to fix) - finishing as much of the report as I can today.</p>



<a name="192193797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192193797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192193797">(Mar 29 2020 at 20:56)</a>:</h4>
<p><strong>Another update</strong>: perf results are on the PR, they’re a mixed bag. I’ve finished writing my paper (only got a video presentation to do now, but that won’t take long) so I’m mostly done with the university requirements part of this work (I’ll have exams in a month but after that I can sink more time into this and other work). </p>
<p>cc <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="119009">@eddyb</span></p>



<a name="192435445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435445">(Mar 31 2020 at 19:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> so I was looking at <a href="https://perf.rust-lang.org/detailed-query.html?commit=2f2ccd26f9e4af93df8495c3d7a2fec418590f97&amp;base_commit=150322f86d441752874a8bed603d71119f190b8b&amp;benchmark=regex-opt&amp;run_name=clean%20incremental" title="https://perf.rust-lang.org/detailed-query.html?commit=2f2ccd26f9e4af93df8495c3d7a2fec418590f97&amp;base_commit=150322f86d441752874a8bed603d71119f190b8b&amp;benchmark=regex-opt&amp;run_name=clean%20incremental">the self-profile results</a> from your PR for the 11% loss</p>



<a name="192435478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435478">(Mar 31 2020 at 19:09)</a>:</h4>
<p>it looks like it's in <code>metadata_decode_entry</code> and <code>encode_query_results_for</code></p>



<a name="192435496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435496">(Mar 31 2020 at 19:09)</a>:</h4>
<p>any idea why that should be? that surprised me somewhat..?</p>



<a name="192435531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435531">(Mar 31 2020 at 19:09)</a>:</h4>
<p>er, wait</p>



<a name="192435578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435578">(Mar 31 2020 at 19:10)</a>:</h4>
<p>The 11% loss was due to LTO taking longer, other benchmarks didn’t have that big a loss, and those were typically due to metadata decode or something like that.</p>



<a name="192435612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435612">(Mar 31 2020 at 19:10)</a>:</h4>
<p>ok, so, <a href="https://perf.rust-lang.org/detailed-query.html?commit=2f2ccd26f9e4af93df8495c3d7a2fec418590f97&amp;base_commit=150322f86d441752874a8bed603d71119f190b8b&amp;benchmark=script-servo-opt&amp;run_name=patched%20incremental:%20println" title="https://perf.rust-lang.org/detailed-query.html?commit=2f2ccd26f9e4af93df8495c3d7a2fec418590f97&amp;base_commit=150322f86d441752874a8bed603d71119f190b8b&amp;benchmark=script-servo-opt&amp;run_name=patched%20incremental:%20println">these are the results</a> that compare the "script-servo-opt" with "patched incremental: println" (11% perf regression)</p>



<a name="192435649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435649">(Mar 31 2020 at 19:10)</a>:</h4>
<p>that fits with what I've seeing</p>



<a name="192435659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435659">(Mar 31 2020 at 19:10)</a>:</h4>
<p>It only happened on one benchmark and I have no idea why.</p>



<a name="192435669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435669">(Mar 31 2020 at 19:10)</a>:</h4>
<p>Neither did eddy</p>



<a name="192435679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435679">(Mar 31 2020 at 19:10)</a>:</h4>
<p>IIRC</p>



<a name="192435680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435680">(Mar 31 2020 at 19:10)</a>:</h4>
<p>I was wondering about something else</p>



<a name="192435701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435701">(Mar 31 2020 at 19:10)</a>:</h4>
<p>we landed various PRs to libstd that did this optimization "by hand" for iterators</p>



<a name="192435716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435716">(Mar 31 2020 at 19:10)</a>:</h4>
<p>in principle, we ought to be able to revert those PRs now, right?</p>



<a name="192435736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435736">(Mar 31 2020 at 19:11)</a>:</h4>
<p>If this were to land; yeah.</p>



<a name="192435748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435748">(Mar 31 2020 at 19:11)</a>:</h4>
<p>I'm not sure we should roll that into this PR but it'd be interesting to see if doing so was "perf-neutral"</p>



<a name="192435947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435947">(Mar 31 2020 at 19:12)</a>:</h4>
<p>I’m not convinced that the perf gain from this is necessarily worth it landing, unless I’ve made a mistake somewhere and we’re losing out on what it could be, the gain is relatively small and it doesn’t play with incremental well as it’s currently written. Memory usage was also all over the place.</p>



<a name="192435986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192435986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192435986">(Mar 31 2020 at 19:13)</a>:</h4>
<p>(basing the above just on the perf results)</p>



<a name="192436602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436602">(Mar 31 2020 at 19:18)</a>:</h4>
<p>Hmm. So, my hope was that this would be the first step towards more extensive work on polymorphization</p>



<a name="192436655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436655">(Mar 31 2020 at 19:18)</a>:</h4>
<p>But I admit I was hoing for better initial perf results</p>



<a name="192436694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436694">(Mar 31 2020 at 19:18)</a>:</h4>
<p>I think this might make a really nice topic for a design meeting</p>



<a name="192436761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436761">(Mar 31 2020 at 19:18)</a>:</h4>
<p>( I was also thinking that this ought to be a "major change proposal" probably, though that's not really in use .. )</p>



<a name="192436841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436841">(Mar 31 2020 at 19:19)</a>:</h4>
<p>but I guess I shoudlf just read your thesis? :)</p>



<a name="192436858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436858">(Mar 31 2020 at 19:19)</a>:</h4>
<p>I'm curious as to why it's not incremental friendly, though I guess I can imagine some of the reasons</p>



<a name="192436915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436915">(Mar 31 2020 at 19:19)</a>:</h4>
<p>Yeah, I’m slightly disappointed by how little perf impact there’s been, it’s very mixed.</p>



<a name="192436976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192436976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192436976">(Mar 31 2020 at 19:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/192436602" title="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/192436602">said</a>:</p>
<blockquote>
<p>Hmm. So, my hope was that this would be the first step towards more extensive work on polymorphization</p>
</blockquote>
<p>I guess the real question is what the next steps look like -- this maybe raises again the question of the work we were doing earlier in trying to estimate how much opportunity is <em>really</em> out there</p>



<a name="192437051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437051">(Mar 31 2020 at 19:20)</a>:</h4>
<p>I just think the analysis walks the line of being not beneficial enough for caching the results to be valuable, but just expensive enough that it is, depending on the workload.</p>



<a name="192437078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437078">(Mar 31 2020 at 19:21)</a>:</h4>
<p>That said, I’m basing that on reading a handful of percentages, I don’t really know.</p>



<a name="192437297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437297">(Mar 31 2020 at 19:22)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="119009">@eddyb</span> who might have some thoughts</p>



<a name="192437800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437800">(Mar 31 2020 at 19:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> did you measure mono items vs instantiations of them?</p>



<a name="192437810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437810">(Mar 31 2020 at 19:26)</a>:</h4>
<p>something might be really weird with the CGU partitioning</p>



<a name="192437837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437837">(Mar 31 2020 at 19:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> actually, more important is the patched incremental</p>



<a name="192437871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437871">(Mar 31 2020 at 19:27)</a>:</h4>
<p>was that what you mentioned with the multiple cgus on one line of the mono item output?</p>



<a name="192437893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437893">(Mar 31 2020 at 19:27)</a>:</h4>
<p>(compile once with <code>CARGO_INCREMENTAL=1</code> to force incremental even in release mode, make a change, then run the same command again)</p>



<a name="192437897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437897">(Mar 31 2020 at 19:27)</a>:</h4>
<p>yeah</p>



<a name="192437920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437920">(Mar 31 2020 at 19:27)</a>:</h4>
<p>but I just realized it's not the important thing I meant to point at here</p>



<a name="192437959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192437959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192437959">(Mar 31 2020 at 19:27)</a>:</h4>
<p>it's possible there are more mono items in the patched incremental build than there were before</p>



<a name="192438029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438029">(Mar 31 2020 at 19:28)</a>:</h4>
<p>or something about the partitioning causes far more things to codegen</p>



<a name="192438065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438065">(Mar 31 2020 at 19:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> <code>RUSTC_LOG=info</code> (the <code>codegen_instance</code> thing) might be more useful than mono items, I'm just realizing</p>



<a name="192438085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438085">(Mar 31 2020 at 19:28)</a>:</h4>
<p>mono items might include stuff that doesn't need re-codegen-ing</p>



<a name="192438120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438120">(Mar 31 2020 at 19:29)</a>:</h4>
<p>(I haven't done this sort of analysis, ever)</p>



<a name="192438884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438884">(Mar 31 2020 at 19:35)</a>:</h4>
<p><a href="https://www.dropbox.com/sh/v0ffr9li5l0i75z/AABctvsXbAxMCUDZ1W98pDdPa?dl=0" title="https://www.dropbox.com/sh/v0ffr9li5l0i75z/AABctvsXbAxMCUDZ1W98pDdPa?dl=0">https://www.dropbox.com/sh/v0ffr9li5l0i75z/AABctvsXbAxMCUDZ1W98pDdPa?dl=0</a> - here's the mono item output from the script crate when I tested locally.</p>
<div class="message_inline_ref"><a href="https://www.dropbox.com/sh/v0ffr9li5l0i75z/AABctvsXbAxMCUDZ1W98pDdPa?dl=0" title="Polymorphisation"><img src="https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png"></a><div><div class="message_inline_image_title">Polymorphisation</div><desc class="message_inline_image_desc"></desc></div></div>



<a name="192438923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438923">(Mar 31 2020 at 19:35)</a>:</h4>
<p>Just running <code>cargo +$OLD clean &amp;&amp; cargo +$OLD rustc -- -Z print-mono-items=lazy</code> with the versions from perf, downloaded from the dev-static S3</p>



<a name="192438936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192438936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192438936">(Mar 31 2020 at 19:35)</a>:</h4>
<p>and piping that into a file</p>



<a name="192439090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192439090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192439090">(Mar 31 2020 at 19:36)</a>:</h4>
<p>I didn't try reproduce the clean, baseline, clean incr, patched stuff from perf when I counted mono items.</p>



<a name="192480117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192480117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192480117">(Apr 01 2020 at 03:34)</a>:</h4>
<p>Possibly a bad question, but how many items were we expecting could be polymorphic? i.e. what was the expected savings on the number of generated items? And are there any cases that we expected to be polymorphic that aren't?</p>



<a name="192536250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192536250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192536250">(Apr 01 2020 at 14:28)</a>:</h4>
<p><span class="user-mention" data-user-id="198054">@mark-i-m</span> it's almost entirely based on closures not using their parent <code>fn</code>'s generics right now</p>



<a name="192536308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192536308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192536308">(Apr 01 2020 at 14:29)</a>:</h4>
<p>it's not transitive between <code>fn</code>s nor taking layout into account</p>



<a name="192562825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/192562825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#192562825">(Apr 01 2020 at 17:22)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I see. Then would it make sense to do some sort of closure stress-test. i.e. create the best-case possible microbenchmark, something we expect to get gigantic improvements from polymorphization. Then we can see what the headroom is and where overhead is</p>



<a name="198465398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/198465398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#198465398">(May 22 2020 at 16:49)</a>:</h4>
<p>Exams/university-in-general is all done now; I've just rebased <a href="https://github.com/rust-lang/rust/issues/69749">#69749</a> on master and I'll start looking into understanding the performance of it better over the weekend.</p>



<a name="201883919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201883919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201883919">(Jun 24 2020 at 18:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I put this off a little longer than I thought I would, but here goes:</p>
<ul>
<li>I've rebased the PR to reduce the number of commits - basically ditching the back-and-forth changes from when the PR was being initially worked on. There's currently 11 commits (down from 49 commits) which makes it a bit easier to rebase and hopefully reduces the number of rebases I'll have to do.</li>
<li>I've re-added a <code>-Z polymorphize</code> flag - it defaults to <code>on</code> but it means I can compare the performance without having two builds.</li>
</ul>
<p>I've started trying to get insight into what is impacting the performance of the PR. So far, I've just been collecting some basic information to steer any deeper dives based on some hypotheses (e.g. codegen unit partitioning is hampering the impact).</p>
<p>In a release build of <code>script-servo</code> with <code>--runs Full</code> only, using rustc-perf:</p>
<table>
<thead>
<tr>
<th><code>-Ztime-passes</code> (total)</th>
<th><code>-Zpolymorphize=on</code></th>
<th><code>-Z polymorphize=off</code></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-Z codegen-units=1</code></td>
<td>633.040 (<a href="/user_uploads/4715/385eNQkUHCHaNFfovTGqdJZC/Ztp-polymorphization-20200624-cgu1-script-servo-Opt-Full">data</a>)</td>
<td>729.907 ( <a href="/user_uploads/4715/QNTjRhyDfqnqFgUp0G-EBiDM/Ztp-polymorphization-20200624-cgu1-off-script-servo-Opt-Full">data</a> )</td>
</tr>
<tr>
<td>(no other flags)</td>
<td>232.379 (<a href="/user_uploads/4715/TZdx596d-kyf811qengwoEUC/Ztp-polymorphization-20200624-script-servo-Opt-Full">data</a>)</td>
<td>232.557 (<a href="/user_uploads/4715/VQ7EtDl6Y8gx7-KHqrKTNu-L/Ztp-polymorphization-20200624-off-script-servo-Opt-Full">data</a>)</td>
</tr>
</tbody>
</table>
<p>Based on these initial findings, it definitely seems like codegen partitioning has an impact (cc <span class="user-mention" data-user-id="125250">@Wesley Wiser</span>).</p>
<p>There's only one other issue that I'm aware of:</p>
<ul>
<li>An ICE with the PR when running one of the rustc-perf benchmarks (<code>packed-simd</code> and/or <code>piston-image</code>, from my notes), I've yet to look into it.</li>
</ul>
<p>I'd be interested in what people think the correct approach going forward is. What things should I look into (remaining ICE aside), are we leaning towards landing this, etc.</p>
<p>cc <span class="user-group-mention" data-user-group-id="1162">@WG-mir-opt</span> <span class="user-mention" data-user-id="116083">@pnkfelix</span> <span class="user-mention" data-user-id="119009">@eddyb</span> (folks who might be interested)</p>



<a name="201884993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201884993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201884993">(Jun 24 2020 at 18:25)</a>:</h4>
<p>(benchmarks were done on my desktop while it was idle - but there was still a full desktop environment and browser active; so those numbers probably have a fair bit of noise - in particular, I think the non-one-codegen-unit benchmarks should have been more impacted by polymorphisation, that’s what we saw on perf.r-l.o, IIRC)</p>



<a name="201885685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201885685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201885685">(Jun 24 2020 at 18:31)</a>:</h4>
<p>This is really awesome work <span class="user-mention" data-user-id="116107">@davidtwco</span>!! Thanks for your diligence rebasing the PR and fixing merge conflicts.</p>



<a name="201885795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201885795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201885795">(Jun 24 2020 at 18:32)</a>:</h4>
<p>I haven't taken a close look at the changes yet but I think I would be in favor of landing this if the <code>-zpolymorphize</code> flag defaulted to <code>off</code> for now.</p>



<a name="201885882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201885882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201885882">(Jun 24 2020 at 18:33)</a>:</h4>
<p>I think before we turn this on by default, we'd want to fix the ICE you mentioned. I'd also like to see some <code>mir-opt</code> tests in addition to the <code>ui</code> tests I see in the PR.</p>



<a name="201886122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886122">(Jun 24 2020 at 18:34)</a>:</h4>
<p>I don’t think there would be any difference in mir-opt tests - this doesn’t affect the built MIR, it only intervenes afterwards during monomorphisation and code generation. There might be some mode of mir-opt tests that I’m unaware of though.</p>



<a name="201886216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886216">(Jun 24 2020 at 18:35)</a>:</h4>
<p>Based on this, it seems like it makes sense to (eventually) turn on polymorphization for opt builds, where one might have fewer cgus, right?</p>



<a name="201886310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886310">(Jun 24 2020 at 18:36)</a>:</h4>
<p>Oh, I see. There won't be fewer MIR bodies or bodies with changed substs?</p>



<a name="201886336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886336">(Jun 24 2020 at 18:36)</a>:</h4>
<p>No - it just generates less copies of the functions that are already there.</p>



<a name="201886598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886598">(Jun 24 2020 at 18:38)</a>:</h4>
<p>Ah, I see. That makes sense.</p>



<a name="201886624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886624">(Jun 24 2020 at 18:38)</a>:</h4>
<p>I don’t think fewer codegen units are the reason that there’s an impact - but rather that the now potentially-non-generic (technically it is generic, but there’s only one of it) mono item is no longer being immediately put into a different codegen unit to the parent function which remains generic.</p>



<a name="201886643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886643">(Jun 24 2020 at 18:38)</a>:</h4>
<p>Not sure if that makes sense - I can clarify if not. I’m also not entirely sure that it’s correct - depends how partitioning determines something is generic - since my understanding is that it splits source level modules into two codegen units from the get go based on what is generic.</p>



<a name="201886729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201886729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201886729">(Jun 24 2020 at 18:39)</a>:</h4>
<p>I think it would make sense to land this with the flag default flipped - only concern would be new ICEs being introduced when it isn’t tested.</p>



<a name="201887142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201887142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201887142">(Jun 24 2020 at 18:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116107">davidtwco</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/progress.20updates/near/201886624">said</a>:</p>
<blockquote>
<p>I don’t think fewer codegen units are the reason that there’s an impact - but rather that the now potentially-non-generic (technically it is generic, but there’s only one of it) mono item is no longer being immediately put into a different codegen unit to the parent function which remains generic.</p>
</blockquote>
<p>It makes sense, but I don't understand why that would have a perf impact?</p>



<a name="201887425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201887425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201887425">(Jun 24 2020 at 18:44)</a>:</h4>
<p>That is, I thought the benefit from polymorphization was due to not having to codegen multiple copies of something... so why does it matter which CGU it goes into?</p>



<a name="201887923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201887923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201887923">(Jun 24 2020 at 18:47)</a>:</h4>
<p>It's kind of difficult to explain but, for compilation time performance, it only matters in the incremental case. The non-obvious insight is that our CGUs are not evenly partitioned. It's very common to have 10-100x difference in terms of the amount of code in the CGUs.</p>
<p>So for incremental compilation performance, if the item was previously going into a very small CGU and you modified it, that would be very fast. But now, if that item happens to be partitioned into a large CGU and you modify it, then it will take much longer to recompile.</p>



<a name="201888035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201888035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201888035">(Jun 24 2020 at 18:48)</a>:</h4>
<p>This shows up in <code>perf.rlo</code> as a massive regression in incremental performance but it's really luck of the draw more than anything.</p>



<a name="201889272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201889272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201889272">(Jun 24 2020 at 18:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> It looks like the <code>codegen-unit</code> tests you added were basically what I wanted from the <code>mir-opt</code> tests. <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="201955780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201955780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201955780">(Jun 25 2020 at 11:13)</a>:</h4>
<p>Good news! </p>
<p>I re-visited the two benchmarks from rustc-perf that I had noted as ICE'ing when run locally (this was before the most recent rebases). I recall one of them having a incremental-related error, and the other having a substitution failure.</p>
<p>However, when running today, there was no substitution error in <code>packed-simd</code> anymore and <code>piston-image</code> did have an ICE (but it was unrelated, and I've got a fix in <a href="https://github.com/rust-lang/rust/issues/73719">#73719</a>, which when applied to polymorphisation makes it compile).</p>
<p>With that, I'm not aware of any ICEs with polymorphisation!</p>



<a name="201955821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201955821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201955821">(Jun 25 2020 at 11:13)</a>:</h4>
<p>I assume the substitution failure was some unrelated upstream failure that was since fixed, and that the incremental failure was just some left over files somewhere that were since cleaned.</p>



<a name="201955902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/201955902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#201955902">(Jun 25 2020 at 11:14)</a>:</h4>
<p><span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="203849611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203849611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203849611">(Jul 14 2020 at 15:45)</a>:</h4>
<p>Just an FYI for everyone - this is only waiting on a review and someone deciding to r+.</p>



<a name="203877144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203877144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203877144">(Jul 14 2020 at 19:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> just @ me specifically :P</p>



<a name="203877244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203877244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203877244">(Jul 14 2020 at 19:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> but also I just opened <a href="https://github.com/rust-lang/rust/pull/74341">https://github.com/rust-lang/rust/pull/74341</a>, I wonder if it could simplify some of the stuff you had to do. probably not because your problems were with <code>ty::Closure</code></p>



<a name="203877276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203877276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203877276">(Jul 14 2020 at 19:36)</a>:</h4>
<p>starting to wonder if we should just move the information out of the <code>ty::Closure</code> substs, I have no idea what we got out of putting it there</p>



<a name="203877277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203877277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203877277">(Jul 14 2020 at 19:36)</a>:</h4>
<p>I’ll take a look at that PR shortly.</p>



<a name="203980667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203980667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203980667">(Jul 15 2020 at 16:41)</a>:</h4>
<p>Thanks for nominating this <span class="user-mention" data-user-id="125250">@Wesley Wiser</span>, I didn't even think to do that but it makes a lot of sense!</p>



<a name="203980771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/203980771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#203980771">(Jul 15 2020 at 16:42)</a>:</h4>
<p>You're welcome. I'm really excited to see this land!</p>



<a name="222657993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222657993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222657993">(Jan 13 2021 at 22:46)</a>:</h4>
<p>A small update from tonight's polymorphization work: <a href="https://github.com/rust-lang/rust/pull/75414#pullrequestreview-567715550">https://github.com/rust-lang/rust/pull/75414#pullrequestreview-567715550</a></p>



<a name="222708539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222708539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222708539">(Jan 14 2021 at 12:06)</a>:</h4>
<p>(I'll try to help minimizing <code>ui/impl-trait/example-calendar.rs</code> to see how it disturbs polymorphization)</p>



<a name="222708921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222708921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222708921">(Jan 14 2021 at 12:12)</a>:</h4>
<p>Thanks, that's helpful</p>



<a name="222771808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222771808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222771808">(Jan 14 2021 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">format_month</span><span class="p">(</span><span class="n">it</span>: <span class="nc">impl</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">impl</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">it</span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">_</span><span class="o">|</span><span class="w"> </span><span class="p">())</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="fm">vec!</span><span class="p">[()].</span><span class="n">into_iter</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="fm">vec!</span><span class="p">[</span><span class="n">it</span><span class="p">.</span><span class="n">into_iter</span><span class="p">()].</span><span class="n">into_iter</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="fm">vec!</span><span class="p">[</span><span class="n">it</span><span class="p">.</span><span class="n">into_iter</span><span class="p">()].</span><span class="n">into_iter</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">it</span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">x</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="n">format_month</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">_</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">collect</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="p">});</span><span class="w"></span>
<span class="w">    </span><span class="n">it</span><span class="p">.</span><span class="n">count</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="222771870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222771870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222771870">(Jan 14 2021 at 19:41)</a>:</h4>
<p>You’re the best!</p>



<a name="222771935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222771935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222771935">(Jan 14 2021 at 19:41)</a>:</h4>
<p>not even close, but happy to help :)</p>



<a name="222772385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222772385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222772385">(Jan 14 2021 at 19:44)</a>:</h4>
<p>were the other failing tests acceptably short ?</p>



<a name="222772510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222772510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222772510">(Jan 14 2021 at 19:44)</a>:</h4>
<p>I didn't look at them but I think we figured one of them out already so it's probably fine.</p>



<a name="222772621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222772621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222772621">(Jan 14 2021 at 19:45)</a>:</h4>
<p>nice !</p>



<a name="222772649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222772649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222772649">(Jan 14 2021 at 19:45)</a>:</h4>
<p>I say that, but <span class="user-mention silent" data-user-id="124288">oli</span> figured it out.</p>



<a name="222772955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222772955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222772955">(Jan 14 2021 at 19:47)</a>:</h4>
<p>the cross crate one reminded of the recent changes to MIR encoding (or lack thereof without codegen)</p>



<a name="222773172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773172">(Jan 14 2021 at 19:48)</a>:</h4>
<p>(hopefully it should be easy to verify that hypothesis)</p>



<a name="222773223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773223">(Jan 14 2021 at 19:49)</a>:</h4>
<p>I believe that's what oli worked out in <a class="stream-topic" data-stream-id="216091" href="/#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/fallout.20from.20mir_for_ctfe.20PR">#t-compiler/wg-polymorphization &gt; fallout from mir_for_ctfe PR</a></p>



<a name="222773261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773261">(Jan 14 2021 at 19:49)</a>:</h4>
<p>oh ok</p>



<a name="222773300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773300">(Jan 14 2021 at 19:49)</a>:</h4>
<p>so the 2 failing ones in this comment <a href="https://github.com/rust-lang/rust/pull/75414#discussion_r556918589">https://github.com/rust-lang/rust/pull/75414#discussion_r556918589</a> would be the same issue ?</p>



<a name="222773458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773458">(Jan 14 2021 at 19:50)</a>:</h4>
<p>I don't think so, the second failure was the one I understood to be a result of recent metadata encoding changes, I don't think we understand the first failure yet (unless I've missed something).</p>



<a name="222773897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/222773897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#222773897">(Jan 14 2021 at 19:53)</a>:</h4>
<p>ah sorry I had misread your previous comment to mean the opposite of what you said ...</p>



<a name="238049280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/238049280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#238049280">(May 09 2021 at 17:32)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/bba8710616e5e4722215c0d6b27abaedca03ebad/library/core/src/iter/traits/iterator.rs#L2291-L2298">https://github.com/rust-lang/rust/blob/bba8710616e5e4722215c0d6b27abaedca03ebad/library/core/src/iter/traits/iterator.rs#L2291-L2298</a></p>
<p>This kind of pattern - building closures in helper functions with fewer generic parameters -  is still necessary to reduce the amount of produced IR, right?</p>



<a name="238107957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/progress%20updates/near/238107957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/progress.20updates.html#238107957">(May 10 2021 at 09:00)</a>:</h4>
<p>Polymorphization is disabled currently, so it's still necessary. I believe that case wouldn't be with polymorphization enabled, but I didn't take an exceptionally close look at it.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>